import request from "@/utils/request";

// 查询列表
export function listOrder(query) {
  return request({
    url: "/api/order/list",
    method: "get",
    params: query,
  });
}

// 查询列表全部订单
export function listAllOrder(query) {
  return request({
    url: "/api/order/listAll",
    method: "get",
    params: query,
  });
}

// 新增
export function addOrder(data) {
  return request({
    url: "/api/order/add",
    method: "post",
    data: data,
  });
}
// 新增
export function addOrderSign(data) {
  return request({
    url: "/api/order/addSign",
    method: "post",
    data: data,
  });
}

// 批量新增
export function addOrderList(data) {
  return request({
    url: "/api/order/addList",
    method: "post",
    data: data,
  });
}
// 编辑
export function updateOrder(data) {
  return request({
    url: "/api/order/update",
    method: "post",
    data: data,
  });
}
// 编辑-转让订单
export function updateOrderZhuan(data) {
  return request({
    url: "/api/order/update/zhuan",
    method: "post",
    data: data,
  });
}
// 订单删除
export function deleteOrder(data) {
  return request({
    url: "/api/order/del",
    method: "post",
    data: data,
  });
}

// 单个订单详情查询  通过 id
export function detailsOrder(id) {
  return request({
    url: "/api/order/details/" + id,
    method: "get",
  });
}

// 下载excel 文件
export function downExcelOrder(query) {
  return request({
    url: "/api/order/downExcel",
    method: "get",
    responseType: "blob",
    params: query,
  });
}

// 下载excel 文件
export function downExcelFile(query) {
  return request({
    url: "/api/order/downExcelFile",
    method: "get",
    responseType: "blob",
    params: query,
  });
}


// 订单 
export function applyOrder(data) {
  return request({
    url: "/api/order/apply",
    method: "post",
    data: data,
  });
}

// 订单 
export function applyMoreOrder(data) {
  return request({
    url: "/api/order/applyMore",
    method: "post",
    data: data,
  });
}



// 订单转让审核
export function applyOrderWx(data) {
  return request({
    url: "/api/order/orderApplyWx",
    method: "post",
    data: data,
  });
}

 

// 清洗订单数据
export function changeClean() {
  return request({
    url: "/api/order/changeClean",
    method: "get",
  });
}